<!-- 编辑在售商品弹窗 -->
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">&times;</button>
    <h4 class="modal-title" id="modal-title">编辑在售商品</h4>
</div>
<div class="modal-body">
    <form id="product-edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="javascript:void(0);">
        <!-- 隐藏的flash_sale_id字段 -->
        <input type="hidden" id="flash-sale-id" name="flash_sale_id" value="{$Think.get.flash_sale_id|default=''}">
        <!-- 隐藏的操作类型字段，用于区分添加和编辑 -->
        <input type="hidden" id="action-type" name="action_type" value="add">
        
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2"><span class="text-danger">*</span> 商品ID:</label>
            <div class="col-xs-12 col-sm-8">
                <input type="number" class="form-control" id="product-id-input" name="product_id" placeholder="请输入商品ID" min="1" data-rule="required">
                <span class="help-block">输入商品ID后，系统将自动加载该商品的规格信息</span>
            </div>
        </div>
        
        <div class="form-group" id="product-name-group" style="display: none;">
            <label class="control-label col-xs-12 col-sm-2">商品名称:</label>
            <div class="col-xs-12 col-sm-8">
                <p class="form-control-static" id="product-name-display"></p>
            </div>
        </div>
        
        <!-- 商品规格表格 -->
        <div id="product-specs-container" style="display: none;">
            <div class="form-group">
                <div class="col-xs-12">
                    <table class="table table-bordered" id="product-specs-table">
                        <thead>
                            <tr>
                                <th>规格名称</th>
                                <th>价格</th>
                                <th>抢购限制</th>
                                <th>抢购价格</th>
                            </tr>
                        </thead>
                        <tbody id="product-specs-tbody">
                            <!-- 动态生成规格行 -->
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        
        <div class="form-group">
            <div class="col-xs-12 col-sm-offset-2 col-sm-8">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="submit" class="btn btn-success" id="submit-btn">确定</button>
            </div>
        </div>
    </form>
</div>